package org.cuit.seon.autoconfigure;

import org.cuit.seon.core.context.ApiConfiguration;
import org.cuit.seon.service.ApiService;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class ApiServiceAutoConfiguration {

    @Bean
    public ApiService apiService(ApiProperties properties) {
        ApiConfiguration config = new ApiConfiguration(properties.getHost(), properties.getAccount(), properties.getPassword());
        return new ApiService(config);
    }
}
